package com.topnav.mc.admin.dao.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.topnav.mc.admin.entity.GbCodeBusiness;
import com.topnav.mc.admin.entity.bean.GbCodeBusinessBean;
import com.topnav.mc.base.mc.McMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface GbCodeBusinessMapper extends McMapper<GbCodeBusiness, GbCodeBusinessBean, GbCodeBusiness> {
    String commSql = " SELECT *,CONCAT(name,'(',id,')') AS  busName " +
            " FROM mc_code_business " +
            " ${ew.customSqlSegment}";

    @Select(commSql)
    GbCodeBusinessBean selectInfoOne(@Param(Constants.WRAPPER) Wrapper queryWrapper);

    @Select(commSql)
    List<GbCodeBusinessBean> selectInfoList(@Param(Constants.WRAPPER) Wrapper queryWrapper);

    @Select(commSql)
    Page<GbCodeBusinessBean> selectInfoPage(Page<GbCodeBusiness> page, @Param(Constants.WRAPPER) Wrapper queryWrapper);
}
